package fr.sportsurbains;

import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.ImageButton;

public class AboutActivity extends Activity implements android.view.View.OnClickListener {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_about);
		ImageButton btn_twitter = (ImageButton) this.findViewById(R.id.btn_twitter);
		ImageButton btn_facebook = (ImageButton) this.findViewById(R.id.btn_facebook);
		btn_twitter.setOnClickListener(this);
		btn_facebook.setOnClickListener(this);
		
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.about, menu);
		return true;
	}

	@Override
	public void onClick(View arg0) {
		switch(arg0.getId()) {
		case R.id.btn_twitter:
			Intent tint = new Intent(Intent.ACTION_VIEW,Uri.parse("https://twitter.com/sportsurbains"));
			startActivity(tint);
			break;
		case R.id.btn_facebook:
			Intent fint = new Intent(Intent.ACTION_VIEW,Uri.parse("https://www.facebook.com/sportsurbains"));
			startActivity(fint);
			break;
		}
	}

}
